<?php
$layout='fullwidth';
$view='grid';
$page_limit=12;
$row_limit=$layout!='left' && $layout!='right' ? 4 : 3;
$row_class=$row_limit==4 ? 'three' : 'four';
$counter=0;
$args=array(
	'post_type'=>'evento',
	'posts_per_page'=>12,
	'nopaging'=> true,
	'orderby' => 'date', 
	'order' => 'DESC'
	/*'meta_key' => 'tour_showcase',
	'meta_value' => '0',
	'meta_compare' => '='*/
);
query_posts($args);
while ( have_posts() ) {
	the_post();	
	$destinations=themex_category($post->ID, 'destination');
	$price=themex_price($post->ID);
	$counter++;		
	?>
	<div class="column <?php echo $row_class; ?>col <?php echo $counter==$row_limit ? 'last' : ''; ?>">
		<div class="tour-thumb-container">
			<div class="tour-thumb">						
				<a href="<?php the_permalink(); ?>"><img src="<?php echo themex_thumbnail($post->ID, 460); ?>" class="fullwidth" alt="<?php the_title(); ?>" /></a>
				<div class="tour-caption">
					<h5 class="tour-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
					<?php $price=themex_price($post->ID); ?>
					<?php if($destinations!='' || $price !='') { ?>
					<div class="tour-meta">
						<?php if($destinations!='') { ?>
						<div class="tour-destination"><div class="colored-icon icon-2"></div><?php echo $destinations; ?></div>
						<?php } ?>
						<?php if($price!='') { ?>
						<div class="tour-duration"><?php echo $price; ?></div>
						<?php } ?>
					</div>
					<?php } ?>
				</div>								
			</div>		
			<div class="block-background"></div>
		</div>
	</div>
	<?php 
	if($counter==$row_limit) {
		$counter=0;
		echo '<div class="clear"></div>';
	}
}
wp_reset_query();
?>